1. Field of the Invention
The present invention relates generally to the field of computer systems.
More specifically, the present invention relates to the field of computer systems where an in-circuit emulator is able to emulate the microprocessor of the target computer system in a System Management Mode.
2. Prior Art
In a typical prior art system such as the one illustrated in FIG. 1, an In-Circuit Emulator (ICE) is able to emulate a microprocessor as the microprocessor operates in a System Management Mode (SMM). SMM is a state when the microprocessor is able to manage various system resources such as memory, power supply, etc. in order to control the availability of these resources. SMM also allows the shutdown of a Central Processing Unit (CPU) and system peripherals such as disk drives, keyboards, or display monitors with the option of restarting the system transparently to the system or application software. SMM is a well known feature of microprocessors such as the Intel 1486SL.TM. brand microprocessor developed by Intel Corporation.
SMM also allows the transparent emulation of the system peripherals and provides the hooks or access interfaces for external power management mechanisms such as peripheral activity monitoring (i.e timers), which signal when a peripheral has not been accessed for a predetermined programmed length of time. The operation and use of SMM is well known to those of ordinary skill in the art.
In a typical prior art emulation system, a host computer is used with an emulator to emulate a microprocessor under test. When an instruction is issued from the host computer, via a communication bus to a control processor instructing the emulator to begin emulation, the control processor begins monitoring the microprocessor under test. A message sent from the host computer to the emulator can be used to determine the status or mode of operation of the microprocessor under test.
One of the problems with prior art emulation systems is that when the microprocessor being emulated is in SMM and the microprocessor powers down as normally done, the emulator detects the inactivity of the microprocessor under test as a failure, which may not necessarily be the case.
Another problem and disadvantage of prior art systems is that when the microprocessor under test is in SMM, the user has no means of interrupting the emulation of the microprocessor under test to debug the operation of the system under SMM itself. This means that once a microprocessor under test goes into SMM emulation, it cannot be interrupted until emulation in SMM is completed. After completion of emulation, the user is unable to trace problems that might have occurred while the system was in emulation.
To avoid the loss of data due to power down events and to effectively utilize the SMM capabilities of the microprocessor, an in-circuit emulator design is needed to emulate the host computer when the system under test is in SMM so as not to lose any data while running the test. In addition, an emulator design is needed to enable recovery from a SMM suspend mode and the resumption of execution of the system under test at a location where the system was executing before a power down.